//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package mutsumimod.actions;

import com.megacrit.cardcrawl.actions.AbstractGameAction;
import com.megacrit.cardcrawl.core.AbstractCreature;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.powers.AbstractPower;

public class NotLongAction extends AbstractGameAction {
    private AbstractCreature target;
    private int magicNumber;


    public NotLongAction(AbstractCreature target, int magicNumber) {
        this.target = target;
        this.magicNumber = magicNumber;
    }

    public void update() {
        for(AbstractPower p : target.powers) {
            if(p.type.equals(AbstractPower.PowerType.DEBUFF)&&p.amount > 0) {
                addToTop(new AddPowerAmountAction(p,magicNumber*p.amount));
            }
        }
        CardCrawlGame.sound.play("NULLIFY_SFX");
        this.target.useFastShakeAnimation(0.5F);
        isDone = true;
    }
}
